/*
 * M2TileInfo.java
 * 
 *  author: Daniel Rudigier
 *    date: 31.12.2008
 * 
 * 
 */
package at.momberban2.me.gamecontext;

/**
 * tile info class
 * 
 * @author Daniel Rudigier
 *
 */
public class M2TileInfo {
    /**
     * free tile
     */
    public static final byte TILE_FREE = 0x1;

    /**
     * breakable tile
     */
    public static final byte TILE_BREAKABLE = 0x2;

    /**
     * unbreakable tile
     */
    public static final byte TILE_UNBREAKABLE = 0x3;

    /**
     * occupied tile
     */
    public static final byte TILE_OCCUPIED = 0x4;
    
    private int id;
    
    private int x;
    
    private int y;
    
    private byte state;
    
    /**
     * constructor
     * 
     * @deprecated
     */
    public M2TileInfo() {
        // only used for serialization
    }
    
    /**
     * constructor
     * 
     * @param id
     * @param x
     * @param y
     * @param state
     */
    public M2TileInfo(short id, short x, short y, byte state) {
        this.id = id;
        this.x = x;
        this.y = y;
        this.state = state;
    }

    /**
     * @return id
     */
    public int getId() {
        return id;
    }

    /**
     * @param id to set
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * @return x
     */
    public int getX() {
        return x;
    }

    /**
     * @param x to set
     */
    public void setX(int x) {
        this.x = x;
    }

    /**
     * @return y
     */
    public int getY() {
        return y;
    }

    /**
     * @param y to set
     */
    public void setY(int y) {
        this.y = y;
    }

    /**
     * @return state
     */
    public byte getState() {
        return state;
    }

    /**
     * @param state to set
     */
    public void setState(byte state) {
        this.state = state;
    }

}